<?php

 /*
     System utilites
 */
 
 class __lib_system {
 
 	var $ver = "0.01";
 	
	function moduleEnabled($module_name) {
	
		if($module_name=="") return false;
		
		global $init;
		
		foreach($init['class']->modules as $name => $array) {
			if($name == $module_name) return true;
		}
		
		return false;
	}
	
	function pageEnabled($class, $pagename) {

		if( __lib_system::moduleEnabled($class) == true ) {
			
			$class      = "__module_".$class;
			$run_module = new $class;

			foreach( $run_module->urls as $page => $classname) {
				if($page == $pagename) {
					return true;
				}
			}
			
			return false;
			
		} else return false;
		
	}
	
 }

?>